You cant specify target table Person for update in FROM clause
141
You can't specify target table 'Person' for update in FROM clause -
# WRONG
UPDATE table SET a=value WHERE x IN
(SELECT x FROM table WHERE condition);
# CORRECT (Add one more outer level of select query)
UPDATE table SET a=value WHERE x IN
(SELECT * FROM (SELECT x FROM table WHERE condition) as t)